package cn.cdeden.knowledge.domain;

import cn.cdeden.knowledge.domain.dto.FilesTree;
import cn.cdeden.knowledge.service.dto.SysPortalConfigureDto;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* @author gjx
* @date 2024-09-24
*/
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("sys_portal_configure")
@AutoMappers({@AutoMapper(target = SysPortalConfigureDto.class)})
public class SysPortalConfigure  implements Serializable {
    private static final long serialVersionUID = 1L;

//    @ApiModelProperty(value = "主键ID")
    @TableId(type= IdType.AUTO)
    private Long id;

//    @ApiModelProperty(value = "图标")
    private String icon;

//    @ApiModelProperty(value = "名称")
    private String name;

//    @ApiModelProperty(value = "配置文件的ID")
    private Long fileId;

//    @ApiModelProperty(value = "图标颜色")
    private String iconColor;

//    @ApiModelProperty(value = "文件夹名称")
    private String fileName;

//    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    private String libraryId;

    public void copyFrom(SysPortalConfigure source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
